﻿Public Class frmVideo
    Dim _dsVideo As New dsVideo
    Dim _vd As New dsVong
    Private Sub frmVideo_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        dgvVideo.DataSource = _dsVideo.LayCapDau(1)

        cbVong.DataSource = _vd.LayDSVong()
        cbVong.DisplayMember = 0
        cbVong.ValueMember = "Vong"
    End Sub

    Private Sub dgvVideo_CellMouseDoubleClick(sender As Object, e As DataGridViewCellMouseEventArgs) Handles dgvVideo.CellMouseDoubleClick
        'WebBrowser1.Navigate(_dsVideo.LayLink(cbVong.SelectedValue))
        If e.RowIndex >= 0 AndAlso e.ColumnIndex >= 0 Then
            Dim selectedRow = dgvVideo.Rows(e.RowIndex)
            WebBrowser1.Navigate(_dsVideo.LayLink(selectedRow.Cells(0).Value))
        End If
    End Sub
End Class